package com.example.project1.handle;
/*没有问题*/
import com.example.project1.information.User;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserHandle {
    @Select("select  * from t_user")
    public List<User> findAll();
    //添加数据
    @Insert("insert into t_user(username,password) values (#{username},#{password})")
    public boolean insert(@Param("username") String username, @Param("password") String password);

    @Select("select * from t_user where username = #{username} and password = #{password}")
    public User getuser(@Param("username") String name,@Param("password") String password);

    @Delete("delete from t_user where username = #{username}")
    public boolean deleteuser(@Param("username") String username);
}
